package com.example.smartretaildemo.network.sqliteopenhelper;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

/**
 * @ClassName: ClaMySQLiteOpenHelper$
 * @Description: 作用
 * @Author: letquit
 * @CreateDate: 15/9/2021$
 * @Version: 1.0
 */
public class ClaMySQLiteOpenHelper extends SQLiteOpenHelper {
    public ClaMySQLiteOpenHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        String sql = "create table ClaCom(id integer primary key autoincrement, commodityId varchar, commodityName text, commodityTypeName varchar default NULL, costPrice float default NULL, money float default NULL, num int default NULL, pic text default NULL)";
        sqLiteDatabase.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
    }
}
